Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multicast streams through udpxy in the custom provider #238

Merged
merged 2 commits into from
May 25, 2019
Merged

Support multicast streams through udpxy in the custom provider #238

merged 2 commits into from
May 25, 2019

Conversation

5Ub-Z3r0
Copy link
Contributor

Providers like init7 (www.init7.ch) have a multicast TV offering, and provide a m3u playlist with multicast groups in it (e.g.: https://api.init7.net/tvchannels.m3u).

this (set) of changes add support for generic multicast IPTV through the custom provider.

@chazlarson
Copy link
Contributor

What's the configuration for this look like?

@5Ub-Z3r0
Copy link
Contributor Author

5Ub-Z3r0 commented Mar 21, 2019

A bare minimum of

[[Source]]
  Name = "test"
  Provider = "Custom"
  M3U = "https://api.init7.net/tvchannels.m3u"
  Udpxy = "<udpxy_url>" #e.g.: localhost:4022

would trigger the new behaviour.

A slight downside of using a single providers.Configuration is that every provider configuration will be able to specify a Udpxy entry like the above, but won't have any use for it.

@Nottt
Copy link

Nottt commented Apr 4, 2019

Guys if this is accepted, let me know what is needed to integrate it to new docker architecture

@chazlarson
Copy link
Contributor

chazlarson commented Apr 5, 2019

What I don't understand about this is where that udpxy comes from. Your example points to telly itself, but telly doesn't have any routes to /udp/. Maybe I just don't understand some simple thing.

If this rewrites udp://@239.77.0.77:5000 to http://localhost:6077/udp/@239.77.0.77:5000/, who's responding to that?

@eliagenini
Copy link

@chazlarson in this case udpxy it's exposed locally on the 6077 port

Anyway it would be configurable and allow any remote address.

@chazlarson
Copy link
Contributor

So udpxy is a thing you set up separately, correct? this thing? http://www.udpxy.com/

That's the missing piece. What confused me here is that the configuration example given is using telly's own port [6077], and telly isn't publishing a udp proxy. This pull request doesn't add anything to routes, so it seemed like maybe I was missing something obvious.

Also, the example given shows an invalid URL, which I'm assuming is a typo. Looking at the code I'm thinking that setting should be localhost:6077 without the http:, since the example as shown would result in the URL http://http:localhost:6077/udp/@239.77.0.77:5000/. which seems wrong.

@5Ub-Z3r0
Copy link
Contributor Author

So udpxy is a thing you set up separately, correct? this thing? http://www.udpxy.com/

Yes, sorry, correct.

That's the missing piece. What confused me here is that the configuration example given is using telly's own port [6077], and telly isn't publishing a udp proxy. This pull request doesn't add anything to routes, so it seemed like maybe I was missing something obvious.

Also, the example given shows an invalid URL, which I'm assuming is a typo. Looking at the code I'm thinking that setting should be localhost:6077 without the http:, since the example as shown would result in the URL http://http:localhost:6077/udp/@239.77.0.77:5000/. which seems wrong.

correct again - I've fixed the snippets above (and used a less confusing port).

@5Ub-Z3r0
Copy link
Contributor Author

@chazlarson - so what are your thoughts on this?

@chazlarson
Copy link
Contributor

Seems good; I’m just worried about documentation and support, as it’s not a thing I’m very familiar with.

@chazlarson chazlarson merged commit 781979d into tellytv:dev May 25, 2019
robbiet480 pushed a commit that referenced this pull request Jun 6, 2019
* Add note that M3U can be a file path.

* Fix some spelling

* Update README.md

* Update README.md

* Note about pre-release status.

* Update README.md

* Clarify which sections are required

* Update README.md

* Update README.md

* Update routes.go

Remove the  "-bsf:v", "h264_mp4toannexb" to fix HEVC streams.

* Update to address minor bug in ffmpeg key handling

* Typo

* Minor fixes for breaking changes in go.schedulesdirect

* More fixes for SD

* Spelling fixes

* Update README.md

Specifically state not to change the magic provider names.

* Note on key fields for multiple instances

* Update .circleci/config.yml to use dep so that we stop having build breakage

* Note about IPTV-EPG field names

They don't make sense, but cest la vie.

* Update README.md

* Update README.md

* Fix XMLTV date parsing because Vaders doesnt know how to write dates properly

* Update README.md

Add a reference to specific version.

* Update Vaders URL

* Update README.md

* bump version to 1.1.0.5

* Add a log line in a situation that might indicate a missing config file.

* Add a couple more targets

* Build using the same mechanism as the makefile so the docker build has a version number
Remove redundant build

* Update README.md

* Update tnt.go

* hdhr device ids are alpha numeric

* remove HDHomerun prefix from friendly name

* Removed references to the late, lamented Vader Streams.

* set content type for ffmpeg stream

* remove unused ffmpeg option

-tune is an encoding option. when passing -codec copy,
no encoding is happening so that option is not used.

since there is no encoding or decoding happening, it is
incorrect to state that ffmpeg is transcoding.

* replace dep with go mod

* update dependencies

* fix test failure

* GOPATH not required anymore

* fix version number configuration to be compatible with go modules

* Bump version number to 1.1.0.6

* updated go.mod, go.sum

* Use standard crossbuild for docker build instead of spinning up a docker build container.

* Support multicast streams through udpxy in the custom provider (#238)

* m3uplus parser: support UDP streams.

* Allow customers using the custom provider to use udpxy as a multicast proxy.

* fix squirrel imports to github.com source instead of gopkg.in

gopkg was previously used to lock the version, this is now done correctly in Go 1.6 by cloning the Github default branch

* replace satori/go.uuid with gofrs/uuid

satori/go.uuid is no longer maintained

* xmltv.go: restore a small linter that was rebased away

* update go module deps
chazlarson added a commit to chazlarson/telly that referenced this pull request Jan 12, 2020
* Extend m3u.Track to return line number and raw line

* Checkpoint on internal overhaul of playlist/tracks/lineup/channels.

* FIll PlaylistsCount

* XMLTV/EPG parsing checkpoint

* XMLTV checkpoint

* Checkpoint before redoing Lineup

* Checkpoint again. Too much to list, all good things

* Minor fixes around logging, XMLTV and more

* Checkpoint on Schedules Direct before migrating to new repo

* Migrate to new repo

* Finish hooking in SD

* More Schedules Direct fixes

* Update README

* Update Gopkg.lock

* Fix XMLTV tests

* Fix example.xml path

* Update README.md

* Allow xmltv/example.xml into Git

* Add option to ignore-epg-icons under misc

* Only initialize Schedules Direct if configured. Fixes tellytv#149

* FAQs

Add remarks to address questions asked repeatedly on discord.

* Fixes for bad providers & gzip

* Temporary fix for artwork nil issues

* Change username/password replacement tokens

* Dont panic on empty tags

* Add Iris as a supported provider

* Lowercase tags

* Add Area51 as a provider

* Support including only specific channels

* Possibly fix some weird <new /> behavior

* Maybe fix TV shows for Plex?

* Cleanup .promu.yml, limit to certain platforms for crossbuild

* Update Gopkg.toml

* Bump version

* Fix for <new> XMLTV tag

* Improve logic around adding original-air-date

* Add CORS headers for Angular

* Add frontend

* Initial ffmpeg support

* Update Gopkg

* Telly ffmpeg image

* Add ffmpeg flag

* Add supported providers to comments

* Update readme

Add comments to config file example
Add ffmpeg notes
Expand Docker notes.

* Create ISSUE_TEMPLATE.md

* Delete ISSUE_TEMPLATE.md

* Add note that M3U can be a file path.

* Fix some spelling

* Update README.md

* Update README.md

* Note about pre-release status.

* Update README.md

* Clarify which sections are required

* Update README.md

* Update README.md

* Update routes.go

Remove the  "-bsf:v", "h264_mp4toannexb" to fix HEVC streams.

* Update to address minor bug in ffmpeg key handling

* Typo

* Minor fixes for breaking changes in go.schedulesdirect

* More fixes for SD

* Spelling fixes

* Update README.md

Specifically state not to change the magic provider names.

* Note on key fields for multiple instances

* Update .circleci/config.yml to use dep so that we stop having build breakage

* Note about IPTV-EPG field names

They don't make sense, but cest la vie.

* Update README.md

* Update README.md

* Fix XMLTV date parsing because Vaders doesnt know how to write dates properly

* Update README.md

Add a reference to specific version.

* Update Vaders URL

* Update README.md

* bump version to 1.1.0.5

* Add a log line in a situation that might indicate a missing config file.

* Add a couple more targets

* Build using the same mechanism as the makefile so the docker build has a version number
Remove redundant build

* Update README.md

* Update tnt.go

* hdhr device ids are alpha numeric

* remove HDHomerun prefix from friendly name

* Removed references to the late, lamented Vader Streams.

* set content type for ffmpeg stream

* remove unused ffmpeg option

-tune is an encoding option. when passing -codec copy,
no encoding is happening so that option is not used.

since there is no encoding or decoding happening, it is
incorrect to state that ffmpeg is transcoding.

* replace dep with go mod

* update dependencies

* fix test failure

* GOPATH not required anymore

* fix version number configuration to be compatible with go modules

* Bump version number to 1.1.0.6

* updated go.mod, go.sum

* Use standard crossbuild for docker build instead of spinning up a docker build container.

* Support multicast streams through udpxy in the custom provider (tellytv#238)

* m3uplus parser: support UDP streams.

* Allow customers using the custom provider to use udpxy as a multicast proxy.

* ensure that ffmpeg processes are reaped to prevent zombies (tellytv#262)

* Remove -re from ffmpeg command (tellytv#267)

Remove '-re' from ffmpeg command, was causing buffering/packet loss.  From the ffmpeg docs:

-re (input)

Read input at native frame rate. Mainly used to simulate a grab device, or live input stream (e.g. when reading from a file). Should not be used with actual grab devices or live input streams (where it can cause packet loss).

* Remove references to non-Custom providers.

* Add a few more filetypes to ignore.

* Issues tellytv#185, tellytv#265

* Trimmed build platforms

* tarballs require crossbuild

* bump version

Co-authored-by: Robbie Trencheny <me@robbiet.us>
Co-authored-by: Guy Spronck <guyspr@users.noreply.github.com>
Co-authored-by: EnorMOZ <13998170+EnorMOZ@users.noreply.github.com>
Co-authored-by: BillOatman <woatman@rochester.rr.com>
Co-authored-by: EinAuslander <44206660+EinAuslander@users.noreply.github.com>
Co-authored-by: Aman Gupta <aman@tmm1.net>
Co-authored-by: 5Ub-Z3r0 <1673590+5Ub-Z3r0@users.noreply.github.com>
Co-authored-by: iMx <17220013+iMiMx@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants